Skip to main content

All Questions

0votes
1answer
33views

tensorflow dataset loop endless will model.predict

I use this code to setup my dataset for trainning and predict: train_dataset = train_dataset.batch(train_batch_sz) train_dataset = train_dataset.repeat().prefetch(5) test_dataset_sim = test_dataset ...
Jonathan Roy's user avatar
0votes
0answers
35views

InvalidArgumentError with tf.data.Dataset.from_generator() at random points during training

I want to use a python generator with a tf Dataset to extract and preprocess sequences from a (rather large) numpy array, but I keep getting this error at random points during the first epoch of ...
dstone's user avatar
1vote
1answer
83views

Tensorflow dataset splitted sizing parameter problem: Local rendezvous is aborting with status: OUT_OF_RANGE: End of sequence

Pretty new with data generator and dataset from tensorflow. I struggle with sizing batch, epochs and step... I can't figure the good set up to remove error "Local rendezvous is aborting with ...
Jonathan Roy's user avatar
-1votes
1answer
39views

Convolutional Neural Network is getting unexpectedly high validation accuracy, what could be causing this?

I am building/optimizing a CNN for classifcation of cars from this dataset. My baseline model is getting suprisingly high accuracy from a very simple model architecture, I am concerned there is some ...
GandarfTheWhite's user avatar
1vote
1answer
27views

Give a list of image path pairs to load using tf.data.Dataset.map but it seems to only read 2

I am learning how to use Tensorflow with a piece of old code provided at a workshop a couple of years back (i.e. it should've been tested and works). However it didn't work, and my investigations led ...
Erin's user avatar
0votes
0answers
20views

Strange repetition in loss curves (Tensorflow)

I am training on a custom dataset (of ~200,000 images) that has been constructed to sample from three different datasets at equal frequencies, the main construction steps are: sample_dict = {"...
ThreeOrangeOneRed's user avatar
0votes
0answers
39views

How to load image dataset with XML annotations (containing the labels) into tensor flow dataset?

I am trying to import this dataset into tensor flow. The images are contained in a folder called 'Images' and are named by their indices. The labels to be used in the machine learning model are the ...
Portia's user avatar
-1votes
1answer
85views

Input image is not compatible with tensorflow model input shape [closed]

I was building a model and I wanted to test its performance, thus I imported a local file and load it and try to predict its label with the following code: from tensorflow.preprocessing import image # ...
Efe FRK's user avatar
0votes
1answer
60views

Batch items in Tensorflow Dataset that contain varying first dimension, but constant second dimension

I have a Tensorflow dataset that contains tensors of rank 2. Each tensor was read from a file and has varying first dimension and constant second dimension. For example, the shapes of each item can be ...
Daniyar's user avatar
1vote
1answer
132views

Tensorflow fit won't take custom dataset, but throws error: ValueError: Cannot take the length of shape with unknown rank

I'm trying to train a model previously working fine until recently. The fit function throws the error below: <ipython-input-20-01755a6ded38> in <cell line: 1>() ----> 1 model.fit( ...
Bi Bi's user avatar
1vote
0answers
56views

Conda package conflicts while exporting Tensorflow trained model into ONNX

I used these instructions to build up a conda env and train tensorflow model: conda create --name tf210 python=3.8 conda activate tf210 conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0 pip ...
Felix Ye's user avatar
0votes
0answers
137views

i keep getting this error : TypeError: Expected any non-tensor type, but got a tensor instead

i am trying to train mobilevit using this bee dataset from tensorflow and i keep getting this error TypeError: Expected any non-tensor type, but got a tensor instead. this is the code i wrote, ...
inter galactic's user avatar
1vote
0answers
67views

Tensorflow Performance Drop When Training Sequential Model Using `tf.data.Dataset.from_generator`

I'm training a Sequential model in a binary classification problem. My dataset is in HDF format and consists of many files, which are often too large to fit in memory. To handle this, I tried using a ...
Navix's user avatar
0votes
0answers
204views

model.fit is not working "RuntimeError: `tf.data.Dataset` only supports Python-style iteration in eager mode or within tf.function."

I want to code a simple machine learning on JupyterLab but got error as Title I have collect the data as x are lamda, eps, c (the shape of data is 102010 rows × 3 columns) and y is sen (the shape of ...
Earth's user avatar
0votes
0answers
213views

Python) tf.keras.utils.audio_dataset_from_directory does not return correct labels

I am trying to study the code from [a tensorflow tutorial on audio recognition].(https://www.tensorflow.org/tutorials/audio/simple_audio) But it seems the tf.keras.utils.audio_dataset_from_directory() ...
aureum's user avatar

153050per page
close